CC = gcc
CFLAGS = -Wall -Wextra -g
TARGET = main
OBJS = main.o log.o

all: $(TARGET)

$(TARGET): $(OBJS)
	$(CC) $(CFLAGS) -o $@ $^

main.o: main.c log.h
	$(CC) $(CFLAGS) -c main.c

log.o: log.c log.h
	$(CC) $(CFLAGS) -c log.c

clean:
	rm -f $(OBJS) $(TARGET)

.PHONY: all clean
